<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <title>网罗好礼-刮分无限惊喜</title>
  <style type="text/css">
  html,
  body {
    margin: 0;
    border: 0;
    padding: 0;
    background-color: #fe5923;
  }
  
  img {
    width: 100%;
  }
  
  .top-section {
    line-height: 0;
    font-size: 0;
    -webkit-text-size-adjust: none;
  }
  
  a:link,
  a:visited {
    text-decoration: none;
  }
  
  .btn {
    display: inline-block;
    width: 3.4rem;
    position: absolute;
    top: 5.24rem;
    left: 2.04rem;
    /*outline: 1px solid #f00;*/
    font-size: 0.5rem;
    line-height: 1.5;
    color: #fff;
    text-align: center;
    border-radius: 50px;
    background: -webkit-gradient(linear, 0 0, 100% 0, from(#f9224f), to(#f99a46));

    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
  }
  .content {
    font-size: 0.28rem;
    color: #602400;
    background-color: #fe7c2b;
    margin: 0 0.3rem 0.5rem;
    padding: 0.3rem;
    border-radius: 10px;
  }
  .content  div:nth-of-type(1) {
    color: #ffde00;
    font-size: 0.32rem;
    text-align: center;
    margin-bottom: 0.2rem;
  }
  </style>
  <script type="text/javascript">
  var screenSize = document.documentElement.getBoundingClientRect()
  var fontSize = screenSize.width / 750 * 100
  document.querySelector('html').style.fontSize = fontSize + 'px'
  </script>
  <script type="text/javascript" src='http://10.242.74.205:35729/livereload.js?snipver=1'></script>
</head>

<body class="view">
  <div class="top-section">
    <img src="image/top1.jpg">
    <img src="image/top2.jpg">
    <a class="btn" href="javascript:;">立即参与</a>
  </div>

  <div class="content">
    <div>网易支付红包好礼疯抢中</div>
    <div>最高188元现金红包、考拉海购消费券…等你来抢！ 活动期间在手游、藏宝阁、考拉、严选等手机移动端使用网易支付且该笔订单满8.8元即可获赠1次刮刮卡抽奖机会，使用网易支付APP直接支付且该笔订单满8.8元即可获赠2次刮刮卡抽奖机会！
    </div>
  </div>
  <script>
  document.querySelector('.top-section').style.height = fontSize * 8.06 + 'px'
    var util = {
      getUrlParams: function(url) {
        if(!url) {
          url = location.href
        }
        var reg = /[(\?|\&)]([^=]+)\=([^&#]+)/g, matches, output = {};
        while (matches = reg.exec(url)) {
          var key = decodeURIComponent(matches[1]), value = decodeURIComponent(matches[2]);
          output[key] = value;
        }
        return output;
      },
      getSource: function(paramObj) {
        var result = ''
        if(paramObj.source && paramObj.medium && paramObj.campaign) {
            result = 'source=' + paramObj.source + '&medium=' + paramObj.medium + '&campaign=' + paramObj.campaign
        }
        return result
      }
    }
    var paramObj = util.getUrlParams()
    var takPartInBtn = document.querySelector('.top-section .btn');
    takPartInBtn.addEventListener('click', function(ev) {
        ev.preventDefault();
        
        var pageSchemUrl = encodeURIComponent('epay163://epay.163.com/h5?url=https%3A%2F%2Fepay.163.com%2FgameCharge%2FgameChargeView.htm');          

        if (navigator.userAgent.match('epay163App')) {
          location.href = 'https://i.epay.126.net/a/ac/activity-0412/index.html?promotionId=' + paramObj.promotionId
        } else {
          location.href='https://i.epay.126.net/a/ac/epay/h5/other/launch-app-1.html?promotionId=' + paramObj.promotionId
        }
    });
  </script>
</body>

</html>
